import { NFT_TOKEN, NFTABI } from './index'

export const TokenOfOwner = async (address, pageNum, pageSize) => {
    return tronWeb
        .contract(NFTABI, NFT_TOKEN)
        .tokenOfOwner(address, pageNum, pageSize)
        .call()
}

export const SafeTransferFrom = async (addressFrom, addressTo, tokenId) => {
    console.log(addressFrom, addressTo, tokenId)
    return tronWeb
        .contract(NFTABI, NFT_TOKEN)
        .safeTransferFrom(addressFrom, addressTo, tokenId)
        .send()
}